Strict

Import nrgsMonkeyLib.php

' Certain comments and text inside these tests are from the BlitzMax tests. Don't mind them.

Function Main:Int()
	Print "php Test 4~n"
	
	Local tstring:String = "ABCDEFG"
	Print "Here's something interesting. tstring[0] and ord(tstring) side-by-side"
	Print tstring[0] + " - " + ord(tstring)
	Print "Yet, accessing the tstring as tstring[0..1] will print out A, as shown here"
	Print tstring[0..1]
	
	Print "ltrim() and rtrim() will be updated to lighten up the code, as well as other" + " functions that can take advantage of this."
	
	Print "~n----------------------------------~nstr_pad tests~n----------------------------------~n"
	
	Local sinput:String = "Alien"
	Print "~q" + str_pad( sinput, 10 ) + "~q"
	Print "~q" + str_pad( sinput, 10, "-=", STR_PAD_LEFT ) + "~q"
	Print "~q" + str_pad( sinput, 10, "_", STR_PAD_BOTH ) + "~q"
	Print "~q" + str_pad( sinput, 6, "___" ) + "~q~n"
	
	' More tests need to be done. As the right-most value needs to always be larger than the left side
	' if a value is odd with the STR_PAD_BOTH option
	
	Local hellostr:String = "Hello"
	
	For Local cnt:Int = 0 To 20
		Print str_pad( cnt, 2, "0", STR_PAD_LEFT ) + " ~q" + str_pad( hellostr, cnt, ".", STR_PAD_BOTH ) + "~q"
	Next
	
	Print "~q" + str_pad( "Whatup", 13, ".", STR_PAD_BOTH ) + "~q"
	Print "~q" + str_pad( "Pancakes", 15, ".", STR_PAD_BOTH ) + "~q"
End
